package com.ima;

class RectSelection{
	int left;
	int top;
	int right;
	int bottom;
	float rotate;
	float skew;
	boolean contains(int x,int y){

		if(left<=right){
			if(top<=bottom){
				if(x>=left&&x<right&&y>=top&&y<bottom){
					return true;
				}
			}else if(x>=left&&x<right&&y>=bottom&&y<top){
				return true;
			}
		}else if(x>=right&&x<left&&y>=bottom&&y<top){
			return true;
		}
		return false;
	}
	RectSelection copy(){
		RectSelection result=new RectSelection();
		result.left=left;
		result.top=top;
		result.right=right;
		result.bottom=bottom;
		result.rotate=rotate;
		result.skew=skew;
		return result;
	}
}
